<template>
  <van-tag  type="primary" v-if="!(type == null || type <= 0 || type > 4)" :color="idList[type-1].color">
    {{idList[type-1].label}}
  </van-tag>
</template>

<script>
  export default {
    name: "IdentityTag",
    props: {
      type: {
        type: Number,
        default: null
      }
    },
    data() {
      return {
        idList: [
          {
            label: "合伙人",
            color: "#FF976A"
          },
          {
            label: "省级代理",
            color: "#7232DD"
          },
          {
            label: "市级代理",
            color: "#1989FA"
          },
          {
            label: "业务员",
            color: "#07C160"
          }
        ]
      }
    }
  }
</script>

<style scoped>

</style>
